home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / amigaunits / datatypes.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-01-01  |  38.7 KB  |  1,275 lines

  1. {
  2.     This file is part of the Free Pascal run time library.
  3.  
  4.     A file in Amiga system run time library.
  5.     Copyright (c) 1998-2000 by Nils Sjoholm
  6.     member of the Amiga RTL development team.
  7.  
  8.     See the file COPYING.FPC, included in this distribution,
  9.     for details about the copyright.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14.  
  15.  **********************************************************************}
  16.  
  17. unit datatypes;
  18.  
  19. INTERFACE
  20.  
  21. uses exec, amigados, intuition, utility,
  22.      graphics, iffparse, amigaprinter, prtbase;
  23.  
  24. const
  25. {***************************************************************************}
  26.  
  27.  ID_DTYP = 1146378576;
  28.  
  29. {***************************************************************************}
  30.  
  31.  ID_DTHD = 1146374212;
  32.  
  33. Type
  34.  pDataTypeHeader = ^tDataTypeHeader;
  35.  tDataTypeHeader = record
  36.     dth_Name,                                         { Descriptive name of the data type }
  37.     dth_BaseName,                                     { Base name of the data type }
  38.     dth_Pattern  : STRPTR;                            { Match pattern for file name. }
  39.     dth_Mask : Pointer;                               { Comparision mask }
  40.     dth_GroupID,                                      { Group that the DataType is in }
  41.     dth_ID   : ULONG;                                 { ID for DataType (same as IFF FORM type) }
  42.     dth_MaskLen,                                      { Length of comparision mask }
  43.     dth_Pad   : Integer;                              { Unused at present (must be 0) }
  44.     dth_Flags,                                        { Flags }
  45.     dth_Priority  : WORD;                             { Priority }
  46.  end;
  47.  
  48. const
  49.  DTHSIZE = 32;
  50.  
  51. {***************************************************************************}
  52.  
  53. { Basic type }
  54.  DTF_TYPE_MASK  = $000F;
  55.  DTF_BINARY     = $0000;
  56.  DTF_ASCII      = $0001;
  57.  DTF_IFF        = $0002;
  58.  DTF_MISC       = $0003;
  59.  
  60. { Set if case is important }
  61.  DTF_CASE       = $0010;
  62.  
  63. { Reserved for system use }
  64.  DTF_SYSTEM1    = $1000;
  65.  
  66. {****************************************************************************
  67.  *
  68.  * GROUP ID and ID
  69.  *
  70.  * This is used for filtering out objects that you don't want.  For
  71.  * example, you could make a filter for the ASL file requester so
  72.  * that it only showed the files that were pictures, or even to
  73.  * narrow it down to only show files that were ILBM pictures.
  74.  *
  75.  * Note that the Group ID's are in lower case, and always the first
  76.  * four characters of the word.
  77.  *
  78.  * For ID's; If it is an IFF file, then the ID is the same as the
  79.  * FORM type.  If it isn't an IFF file, then the ID would be the
  80.  * first four characters of name for the file type.
  81.  *
  82.  ****************************************************************************}
  83.  
  84. { System file, such as; directory, executable, library, device, font, etc. }
  85.  GID_SYSTEM      = 1937339252;
  86.  
  87. { Formatted or unformatted text }
  88.  GID_TEXT        = 1952807028;
  89.  
  90. { Formatted text with graphics or other DataTypes }
  91.  GID_DOCUMENT    = 1685021557;
  92.  
  93. { Sound }
  94.  GID_SOUND       = 1936684398;
  95.  
  96. { Musical instruments used for musical scores }
  97.  GID_INSTRUMENT  = 1768846196;
  98.  
  99. { Musical score }
  100.  GID_MUSIC       = 1836413801;
  101.  
  102. { Still picture }
  103.  GID_PICTURE     = 1885954932;
  104.  
  105. { Animated picture }
  106.  GID_ANIMATION   = 1634625901;
  107.  
  108. { Animation with audio track }
  109.  GID_MOVIE       = 1836021353;
  110.  
  111. {***************************************************************************}
  112.  
  113. { A code chunk contains an embedded executable that can be loaded
  114.  * with InternalLoadSeg. }
  115.  ID_CODE = 1146372932;
  116.  
  117. Type
  118. { DataTypes comparision hook context (Read-Only).  This is the
  119.  * argument that is passed to a custom comparision routine. }
  120.  
  121.  pDTHookContext = ^tDTHookContext;
  122.  tDTHookContext = record
  123.     { Libraries that are already opened for your use }
  124.     dthc_SysBase,
  125.     dthc_DOSBase,
  126.     dthc_IFFParseBase,
  127.     dthc_UtilityBase             : pLibrary;
  128.  
  129.     { File context }
  130.     dthc_Lock                    : BPTR;                { Lock on the file }
  131.     dthc_FIB                     : pFileInfoBlock;      { Pointer to a FileInfoBlock }
  132.     dthc_FileHandle              : BPTR;                { Pointer to the file handle (may be NULL) }
  133.     dthc_IFF                     : pIFFHandle;          { Pointer to an IFFHandle (may be NULL) }
  134.     dthc_Buffer                  : STRPTR;              { Buffer }
  135.     dthc_BufferLength            : ULONG;               { Length of the buffer }
  136.  end;
  137.  
  138. {***************************************************************************}
  139.  
  140. const
  141.  ID_TOOL = 1146377292;
  142.  
  143. Type
  144.  pTool = ^tTool;
  145.  tTool = record
  146.     tn_Which,                                      { Which tool is this }
  147.     tn_Flags  : WORD;                              { Flags }
  148.     tn_Program : STRPTR;                           { Application to use }
  149.  end;
  150.  
  151. const
  152.  TSIZE = 8;
  153.  
  154. { defines for tn_Which }
  155.  TW_INFO               =  1;
  156.  TW_BROWSE             =  2;
  157.  TW_EDIT               =  3;
  158.  TW_PRINT              =  4;
  159.  TW_MAIL               =  5;
  160.  
  161. { defines for tn_Flags }
  162.  TF_LAUNCH_MASK        =  $000F;
  163.  TF_SHELL              =  $0001;
  164.  TF_WORKBENCH          =  $0002;
  165.  TF_RX                 =  $0003;
  166.  
  167. {***************************************************************************}
  168.  
  169.  ID_TAGS = 1146377287;
  170.  
  171. {***************************************************************************}
  172.  
  173. Type
  174.  pDataType = ^tDataType;
  175.  tDataType = record
  176.     dtn_Node1,                      { Reserved for system use }
  177.     dtn_Node2   : tNode;            { Reserved for system use }
  178.     dtn_Header  : pDataTypeHeader;  { Pointer to the DataTypeHeader }
  179.     dtn_ToolList: tList;            { List of tool nodes }
  180.     dtn_FunctionName : STRPTR;      { Name of comparision routine }
  181.     dtn_AttrList : pTagItem;         { Object creation tags }
  182.     dtn_Length : ULONG;             { Length of the memory block }
  183.  end;
  184.  
  185. {***************************************************************************}
  186.  
  187.  pToolNode = ^tToolNode;
  188.  tToolNode = Record
  189.     tn_Node   : tNode;                               { Embedded node }
  190.     tn_Tool   : tTool;                               { Embedded tool }
  191.     tn_Length : ULONG;                            { Length of the memory block }
  192.  end;
  193.  
  194. {***************************************************************************}
  195.  
  196. const
  197.  ID_NAME = 1312902469;
  198.  
  199. {***************************************************************************}
  200.  
  201. { text ID's }
  202.  DTERROR_UNKNOWN_DATATYPE              =  2000;
  203.  DTERROR_COULDNT_SAVE                  =  2001;
  204.  DTERROR_COULDNT_OPEN                  =  2002;
  205.  DTERROR_COULDNT_SEND_MESSAGE          =  2003;
  206.  
  207. { new for V40 }
  208.  DTERROR_COULDNT_OPEN_CLIPBOARD        =  2004;
  209.  DTERROR_Reserved                      =  2005;
  210.  DTERROR_UNKNOWN_COMPRESSION           =  2006;
  211.  DTERROR_NOT_ENOUGH_DATA               =  2007;
  212.  DTERROR_INVALID_DATA                  =  2008;
  213.  
  214. { Offset for types }
  215.  DTMSG_TYPE_OFFSET                     =  2100;
  216.  
  217. {***************************************************************************}
  218.  
  219.   DATATYPESCLASS        : Pchar =  'datatypesclass';
  220.  
  221. {***************************************************************************}
  222.  
  223.   DTA_Dummy             =  (TAG_USER+$1000);
  224.  
  225. { Generic attributes }
  226.   DTA_TextAttr          =  (DTA_Dummy+10);
  227.         { (struct TextAttr ) Pointer to the default TextAttr to use for
  228.          * the text within the object. }
  229.  
  230.   DTA_TopVert           =  (DTA_Dummy+11);
  231.         { (LONG) Current top vertical unit }
  232.  
  233.   DTA_VisibleVert       =  (DTA_Dummy+12);
  234.         { (LONG) Number of visible vertical units }
  235.  
  236.   DTA_TotalVert         =  (DTA_Dummy+13);
  237.         { (LONG) Total number of vertical units }
  238.  
  239.   DTA_VertUnit          =  (DTA_Dummy+14);
  240.         { (LONG) Number of pixels per vertical unit }
  241.  
  242.   DTA_TopHoriz          =  (DTA_Dummy+15);
  243.         { (LONG) Current top horizontal unit }
  244.  
  245.   DTA_VisibleHoriz      =  (DTA_Dummy+16);
  246.         { (LONG)  Number of visible horizontal units }
  247.  
  248.   DTA_TotalHoriz        =  (DTA_Dummy+17);
  249.         { (LONG) Total number of horizontal units }
  250.  
  251.   DTA_HorizUnit         =  (DTA_Dummy+18);
  252.         { (LONG) Number of pixels per horizontal unit }
  253.  
  254.   DTA_NodeName          =  (DTA_Dummy+19);
  255.         { (UBYTE ) Name of the current element within the object. }
  256.  
  257.   DTA_Title             =  (DTA_Dummy+20);
  258.         { (UBYTE ) Title of the object. }
  259.  
  260.   DTA_TriggerMethods    =  (DTA_Dummy+21);
  261.         { (struct DTMethod ) Pointer to a NULL terminated array of
  262.          * supported trigger methods. }
  263.  
  264.   DTA_Data              =  (DTA_Dummy+22);
  265.         { (APTR) Object specific data. }
  266.  
  267.   DTA_TextFont          =  (DTA_Dummy+23);
  268.         { (struct TextFont ) Default font to use for text within the
  269.          * object. }
  270.  
  271.   DTA_Methods           =  (DTA_Dummy+24);
  272.         { (ULONG ) Pointer to a ~0 terminated array of supported
  273.          * methods. }
  274.  
  275.   DTA_PrinterStatus     =  (DTA_Dummy+25);
  276.         { (LONG) Printer error message.  Error numbers are defined in
  277.          * <devices/printer.h> }
  278.  
  279.   DTA_PrinterProc       =  (DTA_Dummy+26);
  280.         { PRIVATE (struct Process ) Pointer to the print process. }
  281.  
  282.   DTA_LayoutProc        =  (DTA_Dummy+27);
  283.         { PRIVATE (struct Process ) Pointer to the layout process. }
  284.  
  285.   DTA_Busy              =  (DTA_Dummy+28);
  286.         { Used to turn the applications' busy pointer off and on }
  287.  
  288.   DTA_Sync              =  (DTA_Dummy+29);
  289.         { Used to indicate that new information has been loaded into
  290.          * an object.  This is for models that cache the DTA_TopVert-
  291.          * like tags }
  292.  
  293.   DTA_BaseName          =  (DTA_Dummy+30);
  294.         { The base name of the class }
  295.  
  296.   DTA_GroupID           =  (DTA_Dummy+31);
  297.         { Group that the object must belong in }
  298.  
  299.   DTA_ErrorLevel        =  (DTA_Dummy+32);
  300.         { Error level }
  301.  
  302.   DTA_ErrorNumber       =  (DTA_Dummy+33);
  303.         { datatypes.library error number }
  304.  
  305.   DTA_ErrorString       =  (DTA_Dummy+34);
  306.         { Argument for datatypes.library error }
  307.  
  308.   DTA_Conductor         =  (DTA_Dummy+35);
  309.         { New for V40. (UBYTE ) specifies the name of the
  310.          * realtime.library conductor.  Defaults to "Main". }
  311.  
  312.   DTA_ControlPanel      =  (DTA_Dummy+36);
  313.         { New for V40. (BOOL) Indicate whether a control panel should be
  314.          * embedded within the object (in the animation datatype, for
  315.          * example).  Defaults to TRUE. }
  316.  
  317.   DTA_Immediate         =  (DTA_Dummy+37);
  318.         { New for V40. (BOOL) Indicate whether the object should
  319.          * immediately begin playing.  Defaults to FALSE. }
  320.  
  321.   DTA_Repeat            =  (DTA_Dummy+38);
  322.         { New for V40. (BOOL) Indicate that the object should repeat
  323.          * playing.  Defaults to FALSE. }
  324.  
  325.  
  326. { DTObject attributes }
  327.   DTA_Name              =  (DTA_Dummy+100);
  328.   DTA_SourceType        =  (DTA_Dummy+101);
  329.   DTA_Handle            =  (DTA_Dummy+102);
  330.   DTA_DataType          =  (DTA_Dummy+103);
  331.   DTA_Domain            =  (DTA_Dummy+104);
  332.  
  333. { DON'T USE THE FOLLOWING FOUR TAGS.  USE THE CORRESPONDING TAGS IN
  334.  * <intuition/gadgetclass.h> }
  335.   DTA_Left              =  (DTA_Dummy+105);
  336.   DTA_Top               =  (DTA_Dummy+106);
  337.   DTA_Width             =  (DTA_Dummy+107);
  338.   DTA_Height            =  (DTA_Dummy+108);
  339.  
  340.   DTA_ObjName           =  (DTA_Dummy+109);
  341.   DTA_ObjAuthor         =  (DTA_Dummy+110);
  342.   DTA_ObjAnnotation     =  (DTA_Dummy+111);
  343.   DTA_ObjCopyright      =  (DTA_Dummy+112);
  344.   DTA_ObjVersion        =  (DTA_Dummy+113);
  345.   DTA_ObjectID          =  (DTA_Dummy+114);
  346.   DTA_UserData          =  (DTA_Dummy+115);
  347.   DTA_FrameInfo         =  (DTA_Dummy+116);
  348.  
  349. { DON'T USE THE FOLLOWING FOUR TAGS.  USE THE CORRESPONDING TAGS IN
  350.  * <intuition/gadgetclass.h> }
  351.   DTA_RelRight          =  (DTA_Dummy+117);
  352.   DTA_RelBottom         =  (DTA_Dummy+118);
  353.   DTA_RelWidth          =  (DTA_Dummy+119);
  354.   DTA_RelHeight         =  (DTA_Dummy+120);
  355.  
  356.   DTA_SelectDomain      =  (DTA_Dummy+121);
  357.   DTA_TotalPVert        =  (DTA_Dummy+122);
  358.   DTA_TotalPHoriz       =  (DTA_Dummy+123);
  359.   DTA_NominalVert       =  (DTA_Dummy+124);
  360.   DTA_NominalHoriz      =  (DTA_Dummy+125);
  361.  
  362. { Printing attributes }
  363.   DTA_DestCols          =  (DTA_Dummy+400);
  364.         { (LONG) Destination X width }
  365.  
  366.   DTA_DestRows          =  (DTA_Dummy+401);
  367.         { (LONG) Destination Y height }
  368.  
  369.   DTA_Special           =  (DTA_Dummy+402);
  370.         { (UWORD) Option flags }
  371.  
  372.   DTA_RastPort          =  (DTA_Dummy+403);
  373.         { (struct RastPort ) RastPort to use when printing. (V40) }
  374.  
  375.   DTA_ARexxPortName     =  (DTA_Dummy+404);
  376.         { (STRPTR) Pointer to base name for ARexx port (V40) }
  377.  
  378.  
  379. {***************************************************************************}
  380.  
  381.   DTST_RAM              =  1;
  382.   DTST_FILE             =  2;
  383.   DTST_CLIPBOARD        =  3;
  384.   DTST_HOTLINK          =  4;
  385.  
  386. {***************************************************************************}
  387.  
  388. { Attached to the Gadget.SpecialInfo field of the gadget.  Don't access directly,
  389.  * use the Get/Set calls instead.
  390.  }
  391. Type
  392.  
  393.  pDTSpecialInfo = ^tDTSpecialInfo;
  394.  tDTSpecialInfo = record
  395.     si_Lock            : tSignalSemaphore;       { Locked while in DoAsyncLayout() }
  396.     si_Flags,
  397.  
  398.     si_TopVert,    { Top row (in units) }
  399.     si_VisVert,    { Number of visible rows (in units) }
  400.     si_TotVert,    { Total number of rows (in units) }
  401.     si_OTopVert,   { Previous top (in units) }
  402.     si_VertUnit,   { Number of pixels in vertical unit }
  403.  
  404.     si_TopHoriz,   { Top column (in units) }
  405.     si_VisHoriz,   { Number of visible columns (in units) }
  406.     si_TotHoriz,   { Total number of columns (in units) }
  407.     si_OTopHoriz,  { Previous top (in units) }
  408.     si_HorizUnit  : Longint;  { Number of pixels in horizontal unit }
  409.  end;
  410.  
  411.  
  412. const
  413. { Object is in layout processing }
  414.   DTSIF_LAYOUT         =   1;
  415.  
  416. { Object needs to be layed out }
  417.   DTSIF_NEWSIZE        =   2;
  418.  
  419.   DTSIF_DRAGGING       =   4;
  420.   DTSIF_DRAGSELECT     =   8;
  421.  
  422.   DTSIF_HIGHLIGHT      =   16;
  423.  
  424. { Object is being printed }
  425.   DTSIF_PRINTING       =   32;
  426.  
  427. { Object is in layout process }
  428.   DTSIF_LAYOUTPROC     =   64;
  429.  
  430. {***************************************************************************}
  431.  
  432. Type
  433.  pDTMethod = ^tDTMethod;
  434.  tDTMethod = record
  435.     dtm_Label,
  436.     dtm_Command  : STRPTR;
  437.     dtm_Method   : ULONG;
  438.  end;
  439.  
  440. {***************************************************************************}
  441.  
  442. Const
  443.   DTM_Dummy             =  ($600);
  444.  
  445. { Inquire what environment an object requires }
  446.   DTM_FRAMEBOX          =  ($601);
  447.  
  448. { Same as GM_LAYOUT except guaranteed to be on a process already }
  449.   DTM_PROCLAYOUT        =  ($602);
  450.  
  451. { Layout that is occurring on a process }
  452.   DTM_ASYNCLAYOUT       =  ($603);
  453.  
  454. { When a RemoveDTObject() is called }
  455.   DTM_REMOVEDTOBJECT    =  ($604);
  456.  
  457.   DTM_SELECT            =  ($605);
  458.   DTM_CLEARSELECTED     =  ($606);
  459.  
  460.   DTM_COPY              =  ($607);
  461.   DTM_PRINT             =  ($608);
  462.   DTM_ABORTPRINT        =  ($609);
  463.  
  464.   DTM_NEWMEMBER         =  ($610);
  465.   DTM_DISPOSEMEMBER     =  ($611);
  466.  
  467.   DTM_GOTO              =  ($630);
  468.   DTM_TRIGGER           =  ($631);
  469.  
  470.   DTM_OBTAINDRAWINFO    =  ($640);
  471.   DTM_DRAW              =  ($641);
  472.   DTM_RELEASEDRAWINFO   =  ($642);
  473.  
  474.   DTM_WRITE             =  ($650);
  475.  
  476. { Used to ask the object about itself }
  477. type
  478.  pFrameInfo = ^tFrameInfo;
  479.  tFrameInfo = record
  480.             fri_PropertyFlags : ULONG;
  481.             fri_Resolution : tPoint;
  482.             fri_RedBits :  BYTE;
  483.             fri_GreenBits : BYTE;
  484.             fri_BlueBits : BYTE;
  485.             fri_Dimensions : record
  486.                  Width : ULONG;
  487.                  Height : ULONG;
  488.                  Depth : ULONG;
  489.               end;
  490.             fri_Screen : pScreen;
  491.             fri_ColorMap : pColorMap;
  492.             fri_Flags : ULONG;
  493.          end;
  494.  
  495.  
  496. CONST
  497.  
  498.   FIF_SCALABLE    = $1;
  499.   FIF_SCROLLABLE  = $2;
  500.   FIF_REMAPPABLE  = $4;
  501.  
  502. { DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT }
  503. Type
  504.  
  505.  pdtGeneral = ^tdtGeneral;
  506.  tdtGeneral = record
  507.     MethodID   : ULONG;
  508.     dtg_GInfo  : pGadgetInfo;
  509.  end;
  510.  
  511. { DTM_SELECT }
  512.  pdtSelect = ^tdtSelect;
  513.  tdtSelect = record
  514.     MethodID  : ULONG;
  515.     dts_GInfo : pGadgetInfo;
  516.     dts_Select : tRectangle;
  517.  end;
  518.  
  519. { DTM_FRAMEBOX }
  520.  
  521.  pdtFrameBox = ^tdtFrameBox;
  522.  tdtFrameBox = record
  523.     MethodID             : ULONG;
  524.     dtf_GInfo            : pGadgetInfo;
  525.     dtf_ContentsInfo,     { Input }
  526.     dtf_FrameInfo        : pFrameInfo;         { Output }
  527.     dtf_SizeFrameInfo,
  528.     dtf_FrameFlags       : ULONG;
  529.  end;
  530.  
  531. { DTM_GOTO }
  532.  pdtGoto = ^tdtGoto;
  533.  tdtGoto = record
  534.     MethodID             : ULONG;
  535.     dtg_GInfo            : pGadgetInfo;
  536.     dtg_NodeName         : STRPTR;          { Node to goto }
  537.     dtg_AttrList         : pTagItem;         { Additional attributes }
  538.  end;
  539.  
  540. { DTM_TRIGGER }
  541.  
  542.  pdtTrigger = ^tdtTrigger;
  543.  tdtTrigger = record
  544.     MethodID             : ULONG;
  545.     dtt_GInfo            : pGadgetInfo;
  546.     dtt_Function         : ULONG;
  547.     dtt_Data             : Pointer;
  548.  end;
  549.  
  550. const
  551.   STM_PAUSE             =  1 ;
  552.   STM_PLAY              =  2 ;
  553.   STM_CONTENTS          =  3 ;
  554.   STM_INDEX             =  4 ;
  555.   STM_RETRACE           =  5 ;
  556.   STM_BROWSE_PREV       =  6 ;
  557.   STM_BROWSE_NEXT       =  7 ;
  558.  
  559.   STM_NEXT_FIELD        =  8 ;
  560.   STM_PREV_FIELD        =  9 ;
  561.   STM_ACTIVATE_FIELD    =  10;
  562.  
  563.   STM_COMMAND           =  11;
  564.  
  565. { New for V40 }
  566.   STM_REWIND            =  12;
  567.   STM_FASTFORWARD       =  13;
  568.   STM_STOP              =  14;
  569.   STM_RESUME            =  15;
  570.   STM_LOCATE            =  16;
  571.  
  572. Type
  573. { Printer IO request }
  574.  pprinterIO = ^tprinterIO;
  575.  tprinterIO = record
  576.      ios : tIOStdReq;
  577.      iodrp : tIODRPReq;
  578.      iopc : tIOPrtCmdReq;
  579.  end;
  580. { DTM_PRINT }
  581.  
  582.         pdtPrint = ^tdtPrint;
  583.         tdtPrint = record
  584.             MethodID : ULONG;
  585.             dtp_GInfo : pGadgetInfo;
  586.             dtp_PIO : pprinterIO;
  587.             dtp_AttrList : pTagItem;
  588.          end;
  589.  
  590.  
  591. { DTM_DRAW }
  592.  pdtDraw = ^tdtDraw;
  593.  tdtDraw = record
  594.     MethodID             : ULONG;
  595.     dtd_RPort            : pRastPort;
  596.     dtd_Left,
  597.     dtd_Top,
  598.     dtd_Width,
  599.     dtd_Height,
  600.     dtd_TopHoriz,
  601.     dtd_TopVert          : Longint;
  602.     dtd_AttrList         : pTagItem;          { Additional attributes }
  603.  end;
  604.  
  605. { DTM_WRITE }
  606.  pdtWrite = ^tdtWrite;
  607.  tdtWrite = record
  608.     MethodID             : ULONG;
  609.     dtw_GInfo            : pGadgetInfo;       { Gadget information }
  610.     dtw_FileHandle       : BPTR;              { File handle to write to }
  611.     dtw_Mode             : ULONG;
  612.     dtw_AttrList         : pTagItem;          { Additional attributes }
  613.  end;
  614.  
  615. const
  616. { Save data as IFF data }
  617.   DTWM_IFF       = 0;
  618.  
  619. { Save data as local data format }
  620.   DTWM_RAW       = 1;
  621.  
  622. {***************************************************************************}
  623.  
  624.    PICTUREDTCLASS        : PChar =  'picture.datatype';
  625.  
  626. {***************************************************************************}
  627.  
  628. { Picture attributes }
  629.    PDTA_ModeID           =  (DTA_Dummy + 200);
  630.         { Mode ID of the picture }
  631.  
  632.    PDTA_BitMapHeader     =  (DTA_Dummy + 201);
  633.  
  634.    PDTA_BitMap           =  (DTA_Dummy + 202);
  635.         { Pointer to a class-allocated bitmap, that will end
  636.          * up being freed by picture.class when DisposeDTObject()
  637.          * is called }
  638.  
  639.    PDTA_ColorRegisters   =  (DTA_Dummy + 203);
  640.    PDTA_CRegs            =  (DTA_Dummy + 204);
  641.    PDTA_GRegs            =  (DTA_Dummy + 205);
  642.    PDTA_ColorTable       =  (DTA_Dummy + 206);
  643.    PDTA_ColorTable2      =  (DTA_Dummy + 207);
  644.    PDTA_Allocated        =  (DTA_Dummy + 208);
  645.    PDTA_NumColors        =  (DTA_Dummy + 209);
  646.    PDTA_NumAlloc         =  (DTA_Dummy + 210);
  647.  
  648.    PDTA_Remap            =  (DTA_Dummy + 211);
  649.         { Boolean : Remap picture (defaults to TRUE) }
  650.  
  651.    PDTA_Screen           =  (DTA_Dummy + 212);
  652.         { Screen to remap to }
  653.  
  654.    PDTA_FreeSourceBitMap =  (DTA_Dummy + 213);
  655.         { Boolean : Free the source bitmap after remapping }
  656.  
  657.    PDTA_Grab             =  (DTA_Dummy + 214);
  658.         { Pointer to a Point structure }
  659.  
  660.    PDTA_DestBitMap       =  (DTA_Dummy + 215);
  661.         { Pointer to the destination (remapped) bitmap }
  662.  
  663.    PDTA_ClassBitMap      =  (DTA_Dummy + 216);
  664.         { Pointer to class-allocated bitmap, that will end
  665.          * up being freed by the class after DisposeDTObject()
  666.          * is called }
  667.  
  668.    PDTA_NumSparse        =  (DTA_Dummy + 217);
  669.         { (UWORD) Number of colors used for sparse remapping }
  670.  
  671.    PDTA_SparseTable      =  (DTA_Dummy + 218);
  672.         { (UBYTE *) Pointer to a table of pen numbers indicating
  673.          * which colors should be used when remapping the image.
  674.          * This array must contain as many entries as there
  675.          * are colors specified with PDTA_NumSparse }
  676.  
  677. {***************************************************************************}
  678.  
  679. {  Masking techniques  }
  680.    mskNone                = 0;
  681.    mskHasMask             = 1;
  682.    mskHasTransparentColor = 2;
  683.    mskLasso               = 3;
  684.    mskHasAlpha            = 4;
  685.  
  686. {  Compression techniques  }
  687.    cmpNone                = 0;
  688.    cmpByteRun1            = 1;
  689.    cmpByteRun2            = 2;
  690.  
  691. Type
  692. {  Bitmap header (BMHD) structure  }
  693.  pBitMapHeader = ^tBitMapHeader;
  694.  tBitMapHeader = record
  695.     bmh_Width,                         { Width in pixels }
  696.     bmh_Height   : Word;               { Height in pixels }
  697.     bmh_Left,                          { Left position }
  698.     bmh_Top      : Integer;            { Top position }
  699.     bmh_Depth,                         { Number of planes }
  700.     bmh_Masking,                       { Masking type }
  701.     bmh_Compression,                   { Compression type }
  702.     bmh_Pad      : Byte;
  703.     bmh_Transparent : WORD;            { Transparent color }
  704.     bmh_XAspect,
  705.     bmh_YAspect     : Byte;
  706.     bmh_PageWidth,
  707.     bmh_PageHeight  : Integer;
  708.  end;
  709.  
  710. {***************************************************************************}
  711.  
  712. {  Color register structure }
  713.  pColorRegister = ^tColorRegister;
  714.  tColorRegister = record
  715.    red, green, blue : Byte;
  716.  end;
  717.  
  718. {***************************************************************************}
  719.  
  720. const
  721. { IFF types that may be in pictures }
  722.    ID_ILBM         = 1229734477;
  723.    ID_BMHD         = 1112361028;
  724.    ID_BODY         = 1112491097;
  725.    ID_CMAP         = 1129136464;
  726.    ID_CRNG         = 1129467463;
  727.    ID_GRAB         = 1196572994;
  728.    ID_SPRT         = 1397772884;
  729.    ID_DEST         = 1145394004;
  730.    ID_CAMG         = 1128353095;
  731.  
  732. {***************************************************************************}
  733.  
  734.    SOUNDDTCLASS          : PChar =  'sound.datatype';
  735.  
  736. {***************************************************************************}
  737.  
  738. { Sound attributes }
  739.    SDTA_Dummy            =  (DTA_Dummy + 500);
  740.    SDTA_VoiceHeader      =  (SDTA_Dummy + 1);
  741.    SDTA_Sample           =  (SDTA_Dummy + 2);
  742.    { (UBYTE *) Sample data }
  743.  
  744.    SDTA_SampleLength     =  (SDTA_Dummy + 3);
  745.    { (ULONG) Length of the sample data in UBYTEs }
  746.  
  747.    SDTA_Period           =  (SDTA_Dummy + 4);
  748.     { (UWORD) Period }
  749.  
  750.    SDTA_Volume           =  (SDTA_Dummy + 5);
  751.     { (UWORD) Volume.  Range from 0 to 64 }
  752.  
  753.    SDTA_Cycles           =  (SDTA_Dummy + 6);
  754.  
  755. { The following tags are new for V40 }
  756.    SDTA_SignalTask       =  (SDTA_Dummy + 7);
  757.     { (struct Task *) Task to signal when sound is complete or
  758.         next buffer needed. }
  759.  
  760.    SDTA_SignalBit        =  (SDTA_Dummy + 8);
  761.     { (BYTE) Signal bit to use on completion or -1 to disable }
  762.  
  763.    SDTA_Continuous       =  (SDTA_Dummy + 9);
  764.     { (ULONG) Playing a continuous stream of data.  Defaults to
  765.         FALSE. }
  766.  
  767. {***************************************************************************}
  768.  
  769.    CMP_NONE     = 0;
  770.    CMP_FIBDELTA = 1;
  771.  
  772. Type
  773.  pVoiceHeader = ^tVoiceHeader;
  774.  tVoiceHeader = record
  775.     vh_OneShotHiSamples,
  776.     vh_RepeatHiSamples,
  777.     vh_SamplesPerHiCycle : ULONG;
  778.     vh_SamplesPerSec     : WORD;
  779.     vh_Octaves,
  780.     vh_Compression       : Byte;
  781.     vh_Volume            : ULONG;
  782.  end;
  783.  
  784. {***************************************************************************}
  785.  
  786. const
  787. { IFF types }
  788.    ID_8SVX = 944985688;
  789.    ID_VHDR = 1447576658;
  790.  
  791. {***************************************************************************}
  792.  
  793. { ***************************************************************************}
  794.  
  795.    TEXTDTCLASS           : PChar =  'text.datatype';
  796.  
  797. { ***************************************************************************}
  798.  
  799. {  Text attributes }
  800.    TDTA_Buffer           =  (DTA_Dummy + 300);
  801.    TDTA_BufferLen        =  (DTA_Dummy + 301);
  802.    TDTA_LineList         =  (DTA_Dummy + 302);
  803.    TDTA_WordSelect       =  (DTA_Dummy + 303);
  804.    TDTA_WordDelim        =  (DTA_Dummy + 304);
  805.    TDTA_WordWrap         =  (DTA_Dummy + 305);
  806.      {  Boolean. Should the text be word wrapped.  Defaults to false. }
  807.  
  808. { ***************************************************************************}
  809.  
  810. Type
  811. {  There is one Line structure for every line of text in our document.  }
  812.  pLine = ^tLine;
  813.  tLine = record
  814.     ln_Link              : tMinNode;            {  to link the lines together }
  815.     ln_Text              : STRPTR;              {  pointer to the text for this line }
  816.     ln_TextLen           : ULONG;               {  the character length of the text for this line }
  817.     ln_XOffset,                                 {  where in the line the text starts }
  818.     ln_YOffset,                                 {  line the text is on }
  819.     ln_Width,                                   {  Width of line in pixels }
  820.     ln_Height,                                  {  Height of line in pixels }
  821.     ln_Flags             : WORD;                {  info on the line }
  822.     ln_FgPen,                                   {  foreground pen }
  823.     ln_BgPen             : Shortint;            {  background pen }
  824.     ln_Style             : ULONG;               {  Font style }
  825.     ln_Data              : Pointer;             {  Link data... }
  826.  end;
  827.  
  828. { ***************************************************************************}
  829.  
  830. const
  831. {  Line.ln_Flags }
  832.  
  833. {  Line Feed }
  834.    LNF_LF        = 1;
  835.  
  836. {  Segment is a link }
  837.    LNF_LINK      = 2;
  838.  
  839. {  ln_Data is a pointer to an DataTypes object }
  840.    LNF_OBJECT    = 4;
  841.  
  842. {  Object is selected }
  843.    LNF_SELECTED  = 8;
  844.  
  845. { ***************************************************************************}
  846.  
  847. {  IFF types that may be text }
  848.    ID_FTXT         = 1179932756;
  849.    ID_CHRS         = 1128813139;
  850.  
  851. { ***************************************************************************}
  852.  
  853.    ANIMATIONDTCLASS         : PChar =       'animation.datatype';
  854.  
  855. { ***************************************************************************}
  856.  
  857. {  Animation attributes }
  858.    ADTA_Dummy            =  (DTA_Dummy + 600);
  859.    ADTA_ModeID           =  PDTA_ModeID      ;
  860.    ADTA_KeyFrame         =  PDTA_BitMap      ;
  861.         {  (struct BitMap *) Key frame (first frame) bitmap }
  862.  
  863.    ADTA_ColorRegisters   =  PDTA_ColorRegisters;
  864.    ADTA_CRegs            =  PDTA_CRegs         ;
  865.    ADTA_GRegs            =  PDTA_GRegs         ;
  866.    ADTA_ColorTable       =  PDTA_ColorTable    ;
  867.    ADTA_ColorTable2      =  PDTA_ColorTable2   ;
  868.    ADTA_Allocated        =  PDTA_Allocated     ;
  869.    ADTA_NumColors        =  PDTA_NumColors     ;
  870.    ADTA_NumAlloc         =  PDTA_NumAlloc      ;
  871.  
  872.    ADTA_Remap            =  PDTA_Remap;
  873.         {  (BOOL) : Remap animation (defaults to TRUE) }
  874.  
  875.    ADTA_Screen           =  PDTA_Screen;
  876.         {  (struct Screen *) Screen to remap to }
  877.  
  878.    ADTA_NumSparse        =  PDTA_NumSparse;
  879.         {  (UWORD) Number of colors used for sparse remapping }
  880.  
  881.    ADTA_SparseTable      =  PDTA_SparseTable;
  882.         {  (UBYTE *) Pointer to a table of pen numbers indicating
  883.          * which colors should be used when remapping the image.
  884.          * This array must contain as many entries as there
  885.          * are colors specified with ADTA_NumSparse }
  886.  
  887.    ADTA_Width            =  (ADTA_Dummy + 1);
  888.    ADTA_Height           =  (ADTA_Dummy + 2);
  889.    ADTA_Depth            =  (ADTA_Dummy + 3);
  890.    ADTA_Frames           =  (ADTA_Dummy + 4);
  891.         {  (ULONG) Number of frames in the animation }
  892.  
  893.    ADTA_Frame            =  (ADTA_Dummy + 5);
  894.         {  (ULONG) Current frame }
  895.  
  896.    ADTA_FramesPerSecond  =  (ADTA_Dummy + 6);
  897.         {  (ULONG) Frames per second }
  898.  
  899.    ADTA_FrameIncrement   =  (ADTA_Dummy + 7);
  900.         {  (LONG) Amount to change frame by when fast forwarding or
  901.          * rewinding.  Defaults to 10. }
  902.  
  903. {  Sound attributes }
  904.    ADTA_Sample           =  SDTA_Sample      ;
  905.    ADTA_SampleLength     =  SDTA_SampleLength;
  906.    ADTA_Period           =  SDTA_Period      ;
  907.    ADTA_Volume           =  SDTA_Volume      ;
  908.    ADTA_Cycles           =  SDTA_Cycles      ;
  909.  
  910. { ***************************************************************************}
  911.  
  912.    ID_ANIM   = 1095649613;
  913.    ID_ANHD   = 1095649348;
  914.    ID_DLTA   = 1145852993;
  915.  
  916. { ***************************************************************************}
  917.  
  918. {   Required ANHD structure describes an ANIM frame }
  919. Type
  920.  pAnimHeader = ^tAnimHeader;
  921.  tAnimHeader = record
  922.     ah_Operation   : Byte;  {   The compression method:
  923.                                      0  set directly (normal ILBM BODY),
  924.                                      1  XOR ILBM mode,
  925.                                      2  Long Delta mode,
  926.                                      3  Short Delta mode,
  927.                                      4  Generalized short/long Delta mode,
  928.                                      5  Byte Vertical Delta mode
  929.                                      6  Stereo op 5 (third party)
  930.                                     74  (ascii 'J') reserved for Eric Graham's
  931.                                         compression technique (details to be
  932.                                         released later). }
  933.  
  934.     ah_Mask        : Byte;      {  (XOR mode only - plane mask where each
  935.                                    bit is set =1 if there is data and =0
  936.                                    if not.) }
  937.  
  938.     ah_Width,                   {  (XOR mode only - width and height of the }
  939.     ah_Height,                  {  area represented by the BODY to eliminate }
  940.                                 {  unnecessary un-changed data) }
  941.  
  942.  
  943.     ah_Left,                    {  (XOR mode only - position of rectangular }
  944.     ah_Top         : WORD;      {  area representd by the BODY) }
  945.  
  946.  
  947.     ah_AbsTime,                 {  Timing for a frame relative to the time
  948.                                    the first frame was displayed, in
  949.                                    jiffies (1/60 sec) }
  950.  
  951.     ah_RelTime     : ULONG;    {  Timing for frame relative to time
  952.                                    previous frame was displayed - in
  953.                                    jiffies (1/60 sec) }
  954.  
  955.     ah_Interleave,              {  Indicates how may frames back this data is to
  956.                                    modify.  0 defaults to indicate two frames back
  957.                                    (for double buffering). n indicates n frames back.
  958.                                    The main intent here is to allow values
  959.                                    of 1 for special applications where
  960.                                    frame data would modify the immediately
  961.                                    previous frame. }
  962.  
  963.     ah_Pad0        :  Byte;     {  Pad byte, not used at present. }
  964.  
  965.     ah_Flags       : ULONG;     {  32 option bits used by options=4 and 5.
  966.                                    At present only 6 are identified, but the
  967.                                    rest are set =0 so they can be used to
  968.                                    implement future ideas.  These are defined
  969.                                    for option 4 only at this point.  It is
  970.                                    recommended that all bits be set =0 for
  971.                                    option 5 and that any bit settings
  972.                                    used in the future (such as for XOR mode)
  973.                                    be compatible with the option 4
  974.                                    bit settings.   Player code should check
  975.                                    undefined bits in options 4 and 5 to assure
  976.                                    they are zero.
  977.  
  978.                                    The six bits for current use are:
  979.  
  980.                                     bit #       set =0                  set =1
  981.                                     ===============================================
  982.                                     0           short data              long data
  983.                                     1           set                     XOR
  984.                                     2           separate info           one info list
  985.                                                 for each plane          for all planes
  986.                                     3           not RLC                 RLC (run length coded)
  987.                                     4           horizontal              vertical
  988.                                     5           short info offsets      long info offsets
  989.                                 }
  990.  
  991.     ah_Pad  : Array[0..15] of Byte;    {  This is a pad for future use for future
  992.                                    compression modes. }
  993.  end;
  994.  
  995. { ***************************************************************************}
  996.  
  997. const
  998.    ADTM_Dummy            =  ($700);
  999.  
  1000.    ADTM_LOADFRAME        =  ($701);
  1001.     {  Used to load a frame of the animation }
  1002.  
  1003.    ADTM_UNLOADFRAME      =  ($702);
  1004.     {  Used to unload a frame of the animation }
  1005.  
  1006.    ADTM_START            =  ($703);
  1007.     {  Used to start the animation }
  1008.  
  1009.    ADTM_PAUSE            =  ($704);
  1010.     {  Used to pause the animation (don't reset the timer) }
  1011.  
  1012.    ADTM_STOP             =  ($705);
  1013.     {  Used to stop the animation }
  1014.  
  1015.    ADTM_LOCATE           =  ($706);
  1016.     {  Used to locate a frame in the animation (as set by a slider...) }
  1017.  
  1018. { ***************************************************************************}
  1019.  
  1020. {  ADTM_LOADFRAME, ADTM_UNLOADFRAME }
  1021. Type
  1022.  padtFrame = ^tadtFrame;
  1023.  tadtFrame = record
  1024.     MethodID,
  1025.     alf_TimeStamp,         {  Timestamp of frame to load }
  1026.  
  1027.     {  The following fields are filled in by the ADTM_LOADFRAME method, }
  1028.     {  and are read-only for any other methods. }
  1029.  
  1030.     alf_Frame,                        {  Frame number }
  1031.     alf_Duration  :  ULONG;           {  Duration of frame }
  1032.  
  1033.     alf_BitMap    :  pBitMap;         {  Loaded BitMap }
  1034.     alf_CMap      :  pColorMap;       {  Colormap, if changed }
  1035.  
  1036.     alf_Sample    :  Pointer;         {  Sound data }
  1037.     alf_SampleLength,
  1038.     alf_Period    : ULONG;
  1039.  
  1040.     alf_UserData  : Pointer;          {  Used by load frame for extra data }
  1041.  end;
  1042.  
  1043. {  ADTM_START, ADTM_PAUSE, ADTM_STOP, ADTM_LOCATE }
  1044.  padtStart = ^tadtStart;
  1045.  tadtStart = record
  1046.     MethodID,
  1047.     asa_Frame : ULONG;             {  Frame # to start at }
  1048.  end;
  1049.  
  1050. { ***************************************************************************}
  1051.  
  1052. VAR DataTypesBase : pLibrary;
  1053.  
  1054. FUNCTION AddDTObject(win : pWindow; req : pRequester; o : pObject_; pos : LONGINT) : LONGINT;
  1055. PROCEDURE DisposeDTObject(o : pObject_);
  1056. FUNCTION DoAsyncLayout(o : pObject_; gpl : pgpLayout) : ULONG;
  1057. FUNCTION DoDTMethodA(o : pObject_; win : pWindow; req : pRequester; msg : pLONGINT) : ULONG;
  1058. FUNCTION GetDTAttrsA(o : pObject_; attrs : pTagItem) : ULONG;
  1059. FUNCTION GetDTMethods(obj : pObject_) : Pointer;
  1060. FUNCTION GetDTString(id : ULONG) : pCHAR;
  1061. FUNCTION GetDTTriggerMethods(obj : pObject_) : pDTMethod;
  1062. FUNCTION NewDTObjectA(name : POINTER; attrs : pTagItem): POINTER;
  1063. FUNCTION ObtainDataTypeA(typ : ULONG; handle : POINTER; attrs : pTagItem) : pDataType;
  1064. FUNCTION PrintDTObjectA(o : pObject_; w : pWindow; r : pRequester; msg : pdtPrint) : ULONG;
  1065. PROCEDURE RefreshDTObjectA(o : pObject_; win : pWindow; req : pRequester; attrs : pTagItem);
  1066. PROCEDURE ReleaseDataType(dt : pDataType);
  1067. FUNCTION RemoveDTObject(win : pWindow; o : pObject_) : LONGINT;
  1068. FUNCTION SetDTAttrsA(o : pObject_; win : pWindow; req : pRequester; attrs : pTagItem) : ULONG;
  1069.  
  1070. IMPLEMENTATION
  1071.  
  1072. FUNCTION AddDTObject(win : pWindow; req : pRequester; o : pObject_; pos : LONGINT) : LONGINT;
  1073. BEGIN
  1074.   ASM
  1075.     MOVE.L  A6,-(A7)
  1076.     MOVEA.L win,A0
  1077.     MOVEA.L req,A1
  1078.     MOVEA.L o,A2
  1079.     MOVE.L  pos,D0
  1080.     MOVEA.L DataTypesBase,A6
  1081.     JSR -072(A6)
  1082.     MOVEA.L (A7)+,A6
  1083.     MOVE.L  D0,@RESULT
  1084.   END;
  1085. END;
  1086.  
  1087. PROCEDURE DisposeDTObject(o : pObject_);
  1088. BEGIN
  1089.   ASM
  1090.     MOVE.L  A6,-(A7)
  1091.     MOVEA.L o,A0
  1092.     MOVEA.L DataTypesBase,A6
  1093.     JSR -054(A6)
  1094.     MOVEA.L (A7)+,A6
  1095.   END;
  1096. END;
  1097.  
  1098. FUNCTION DoAsyncLayout(o : pObject_; gpl : pgpLayout) : ULONG;
  1099. BEGIN
  1100.   ASM
  1101.     MOVE.L  A6,-(A7)
  1102.     MOVEA.L o,A0
  1103.     MOVEA.L gpl,A1
  1104.     MOVEA.L DataTypesBase,A6
  1105.     JSR -084(A6)
  1106.     MOVEA.L (A7)+,A6
  1107.     MOVE.L  D0,@RESULT
  1108.   END;
  1109. END;
  1110.  
  1111. FUNCTION DoDTMethodA(o : pObject_; win : pWindow; req : pRequester; msg : pLONGINT) : ULONG;
  1112. BEGIN
  1113.   ASM
  1114.     MOVE.L  A6,-(A7)
  1115.     MOVEA.L o,A0
  1116.     MOVEA.L win,A1
  1117.     MOVEA.L req,A2
  1118.     MOVEA.L msg,A3
  1119.     MOVEA.L DataTypesBase,A6
  1120.     JSR -090(A6)
  1121.     MOVEA.L (A7)+,A6
  1122.     MOVE.L  D0,@RESULT
  1123.   END;
  1124. END;
  1125.  
  1126. FUNCTION GetDTAttrsA(o : pObject_; attrs : pTagItem) : ULONG;
  1127. BEGIN
  1128.   ASM
  1129.     MOVE.L  A6,-(A7)
  1130.     MOVEA.L o,A0
  1131.     MOVEA.L attrs,A2
  1132.     MOVEA.L DataTypesBase,A6
  1133.     JSR -066(A6)
  1134.     MOVEA.L (A7)+,A6
  1135.     MOVE.L  D0,@RESULT
  1136.   END;
  1137. END;
  1138.  
  1139. FUNCTION GetDTMethods(obj : pObject_) : POINTER;
  1140. BEGIN
  1141.   ASM
  1142.     MOVE.L  A6,-(A7)
  1143.     MOVEA.L obj,A0
  1144.     MOVEA.L DataTypesBase,A6
  1145.     JSR -102(A6)
  1146.     MOVEA.L (A7)+,A6
  1147.     MOVE.L  D0,@RESULT
  1148.   END;
  1149. END;
  1150.  
  1151. FUNCTION GetDTString(id : ULONG) : pCHAR;
  1152. BEGIN
  1153.   ASM
  1154.     MOVE.L  A6,-(A7)
  1155.     MOVE.L  id,D0
  1156.     MOVEA.L DataTypesBase,A6
  1157.     JSR -138(A6)
  1158.     MOVEA.L (A7)+,A6
  1159.     MOVE.L  D0,@RESULT
  1160.   END;
  1161. END;
  1162.  
  1163. FUNCTION GetDTTriggerMethods(obj : pObject_) : pDTMethod;
  1164. BEGIN
  1165.   ASM
  1166.     MOVE.L  A6,-(A7)
  1167.     MOVEA.L obj,A0
  1168.     MOVEA.L DataTypesBase,A6
  1169.     JSR -108(A6)
  1170.     MOVEA.L (A7)+,A6
  1171.     MOVE.L  D0,@RESULT
  1172.   END;
  1173. END;
  1174.  
  1175. FUNCTION NewDTObjectA(name : POINTER; attrs : pTagItem) : POINTER;
  1176. BEGIN
  1177.   ASM
  1178.     MOVE.L  A6,-(A7)
  1179.     MOVE.L  name,D0
  1180.     MOVEA.L attrs,A0
  1181.     MOVEA.L DataTypesBase,A6
  1182.     JSR -048(A6)
  1183.     MOVEA.L (A7)+,A6
  1184.     MOVE.L  D0,@RESULT
  1185.   END;
  1186. END;
  1187.  
  1188. FUNCTION ObtainDataTypeA(typ : ULONG; handle : POINTER; attrs : pTagItem) : pDataType;
  1189. BEGIN
  1190.   ASM
  1191.     MOVE.L  A6,-(A7)
  1192.     MOVE.L  typ,D0
  1193.     MOVEA.L handle,A0
  1194.     MOVEA.L attrs,A1
  1195.     MOVEA.L DataTypesBase,A6
  1196.     JSR -036(A6)
  1197.     MOVEA.L (A7)+,A6
  1198.     MOVE.L  D0,@RESULT
  1199.   END;
  1200. END;
  1201.  
  1202. FUNCTION PrintDTObjectA(o : pObject_; w : pWindow; r : pRequester; msg : pdtPrint) : ULONG;
  1203. BEGIN
  1204.   ASM
  1205.     MOVE.L  A6,-(A7)
  1206.     MOVEA.L o,A0
  1207.     MOVEA.L w,A1
  1208.     MOVEA.L r,A2
  1209.     MOVEA.L msg,A3
  1210.     MOVEA.L DataTypesBase,A6
  1211.     JSR -114(A6)
  1212.     MOVEA.L (A7)+,A6
  1213.     MOVE.L  D0,@RESULT
  1214.   END;
  1215. END;
  1216.  
  1217. PROCEDURE RefreshDTObjectA(o : pObject_; win : pWindow; req : pRequester; attrs : pTagItem);
  1218. BEGIN
  1219.   ASM
  1220.     MOVE.L  A6,-(A7)
  1221.     MOVEA.L o,A0
  1222.     MOVEA.L win,A1
  1223.     MOVEA.L req,A2
  1224.     MOVEA.L attrs,A3
  1225.     MOVEA.L DataTypesBase,A6
  1226.     JSR -078(A6)
  1227.     MOVEA.L (A7)+,A6
  1228.   END;
  1229. END;
  1230.  
  1231. PROCEDURE ReleaseDataType(dt : pDataType);
  1232. BEGIN
  1233.   ASM
  1234.     MOVE.L  A6,-(A7)
  1235.     MOVEA.L dt,A0
  1236.     MOVEA.L DataTypesBase,A6
  1237.     JSR -042(A6)
  1238.     MOVEA.L (A7)+,A6
  1239.   END;
  1240. END;
  1241.  
  1242. FUNCTION RemoveDTObject(win : pWindow; o : pObject_) : LONGINT;
  1243. BEGIN
  1244.   ASM
  1245.     MOVE.L  A6,-(A7)
  1246.     MOVEA.L win,A0
  1247.     MOVEA.L o,A1
  1248.     MOVEA.L DataTypesBase,A6
  1249.     JSR -096(A6)
  1250.     MOVEA.L (A7)+,A6
  1251.     MOVE.L  D0,@RESULT
  1252.   END;
  1253. END;
  1254.  
  1255. FUNCTION SetDTAttrsA(o : pObject_; win : pWindow; req : pRequester; attrs : pTagItem) : ULONG;
  1256. BEGIN
  1257.   ASM
  1258.     MOVE.L  A6,-(A7)
  1259.     MOVEA.L o,A0
  1260.     MOVEA.L win,A1
  1261.     MOVEA.L req,A2
  1262.     MOVEA.L attrs,A3
  1263.     MOVEA.L DataTypesBase,A6
  1264.     JSR -060(A6)
  1265.     MOVEA.L (A7)+,A6
  1266.     MOVE.L  D0,@RESULT
  1267.   END;
  1268. END;
  1269.  
  1270. END. (* UNIT DATATYPES *)
  1271.  
  1272.  
  1273.  
  1274.  
  1275.